package cn.ithers.blog.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;
import java.io.Serializable;
import java.util.Date;

@Data
@Entity
@Table ( name ="tb_images" )
public class Image implements Serializable {

	@ApiModelProperty(value = "图片ID")
  	@Id
	private String id;

	@ApiModelProperty(value = "用户ID")
  	@Column(name = "user_id" )
	private String userId;

	@ApiModelProperty(value = "路径")
  	@Column(name = "url" )
	private String url;

	@ApiModelProperty(value = "图片路径")
  	@Column(name = "path" )
	private String path;

	@ApiModelProperty(value = "图片类型(jpg、png、gif)")
  	@Column(name = "content_type" )
	private String contentType;

	@ApiModelProperty(value = "原名称")
  	@Column(name = "name" )
	private String name;

	@ApiModelProperty(value = "状态（0表示删除，1表正常）")
  	@Column(name = "state" )
	private String state;

	@ApiModelProperty(value = "图片创建时间")
	@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  	@Column(name = "create_time" )
	private Date createTime;

	@ApiModelProperty(value = "图片更新时间")
	@JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
  	@Column(name = "update_time" )
	private Date updateTime;




}
